﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MessageReceive.aspx.cs"
    Inherits="Face.Web.Message.MessageReceive" %>

<!DOCTYPE html>
<html lang="en">
<head id="Head1" runat="server">
    <meta charset="utf-8" />
    <title>收到的留言</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="" />
    <meta name="author" content="" />
    <link href="../css/bootstrap.min.css" rel="stylesheet" media="screen" />
    <style type="text/css">
        body
        {
            padding-bottom: 40px;
        }
        p
        {
            margin-top: 1px;
            margin-bottom: 1px;
        }
    </style>
    <link href="../css/bootstrap-responsive.min.css" rel="stylesheet" media="screen" />
</head>
<body>
    <form id="form1" runat="server">
    <%--这是顶上的导航栏--%>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="row">
        <div class="span12">
            <div class="row">
                <div class="span3 offset1">
                    <p>
                        <a href="../index.aspx">
                            <img src="/img/logo.png" alt="GatherContent logo"></a></p>
                </div>
                                <div class="span2 pull-right">
                    &nbsp
                    <div class="span3">
                        <div class="row">
                            <div class="span1">
                                <a href="/index.aspx" class=""><span style="color: Gray; font-size: small">主页</span></a>
                            </div>
                            <%if (Session["user"] == null)
                              {%>
                            <div class="span1">
                                <a href="/login_and_signup/signup.aspx">现在就注册</a>
                            </div>
                            <div class="span1">
                                <a href="/login_and_signup/login.aspx" class="btn btn-inverse btn-mini">登录</a>
                            </div>
                            <%
                                }
                              else
                              {%>
                            <div class="btn-group">
                                <a class="btn btn-mini dropdown-toggle ajax-dropdown-toggle" data-toggle="dropdown"
                                    href="#"><span>
                                        <%=Session["user"].ToString()%></span> <span class="caret"></span></a>
                                <ul class="dropdown-menu pull-right">
                                    <li>
                                        <asp:LinkButton ID="LinkButton1" CssClass="item" runat="server" OnClick="btn_logout">Logout</asp:LinkButton></li>
                                </ul>
                            </div>
                            <%} %>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="navbar navbar-inverse">
        <div class="navbar-inner">
            <div class="container">
                <div class="row">
                    <div class="span10 offset1">
                        <ul class="nav">
                            <li class=""><a href="/Pic_and_article/picture.aspx"><i class="icon-camera icon-white section-icon">
                            </i>图片</a> </li>
                            <li class=""><a href="/Pic_and_article/articalList.aspx" class="overview"><i class="icon-pencil icon-white section-icon">
                            </i>文章</a> </li>
                            <li class=""><a href="/VideoPage/VideoHome.aspx"><i class="icon-folder-open icon-white section-icon">
                            </i>视频</a> </li>
                            <% 
                                if(Session["user"]!=null) 
                                {
                            %>
                            <li class="active"><a href="../Message/MessageReceive.aspx"><i class="icon-edit icon-white section-icon">
                            </i>消息管理</a> </li>
                            <li class=""><a href="../VideoPage/MyVideoAlbumsManage.aspx"><i class="icon-play-circle icon-white section-icon">
                            </i>我的视频发布</a> </li>
                            <li class=""><a href="/xwbemo1/UserInfoCheck.aspx"><i class="icon-edit icon-white section-icon">
                            </i>我的用户信息</a> </li>
                            
                            <%
                                }
                            %>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%--/这是顶上的导航栏--%>
    <div class="row">
        <div class="span3 bs-docs-sidebar offset1 thumbnail">
            <ul class="nav nav-list bs-docs-sidenav affix" data-spy="affix" data-offset-top="200">
                <li class=""><a href="/Message/MessageSend.aspx"><i class="icon-chevron-right"></i><span
                    style="font-size: x-large; color: Black">发送的消息</span></a></li>
                <li class="active"><a href="/Message/MessageReceive.aspx"><i class="icon-chevron-right">
                </i><span style="font-size: x-large; color: Black">接收的消息</span></a></li>
            </ul>
        </div>
        <div class="span8">
            <div class="row">
                <br />
                <table class="table table-bordered">
                    <tr>
                        <td>
                            最新评论
                        </td>
                    </tr>
                    <asp:Repeater ID="Message_info" runat="server" OnItemCommand="rpt_Message_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <p>
                                        <span class="videoUsername">
                                            <%#Eval("username")%>&nbsp &nbsp
                                            <%# Eval("video_name") == null ? "" : "  &nbsp &nbsp 回复的视频： " +

                                                Eval("video_name")%>
                                            <%# Eval("reply_id") == null ? "" : " &nbsp &nbsp &nbsp &nbsp 回复： " + 

Eval("reply_username")%>
                                        </span>
                                    </p>
                                    <p>
                                        <%# Eval("message_content")%></p>
                                    <p class="text-right">
                                        <%# Eval("message_time") %>&nbsp &nbsp &nbsp &nbsp <a href="#receiveModel<%#(Container as RepeaterItem).ItemIndex %>"
                                            data-toggle="modal"><span class="videoOperater">回复</span></a>&nbsp &nbsp <a href="#delModel<%#(Container as RepeaterItem).ItemIndex %>"
                                                data-toggle="modal"><span class="videoOperater">删除</span></a> &nbsp &nbsp
                                        &nbsp &nbsp
                                    </p>
                                </td>
                            </tr>
                            <%--回复对话框--%>
                            <div id="receiveModel<%#(Container as RepeaterItem).ItemIndex %>" class="modal hide fade"
                                tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        ×</button>
                                    <h3 id="H6">
                                        回复消息</h3>
                                </div>
                                <div class="modal-body">
                                    <p>
                                        回复：<%# Eval("username")%></p>
                                    <p>
                                        <input type="text" runat="server" id="text_Rename" placeholder="输入一些消息吧。" value="" /></p>
                                </div>
                                <div class="modal-footer">
                                    <button class="btn" data-dismiss="modal" aria-hidden="true">
                                        关闭</button>
                                    <asp:Button ID="btn_ReceiveOK" CssClass="btn btn-primary" runat="server" Text="确定"
                                        CommandName="btn_ReceiveOK" CommandArgument='<%# Eval("message_id")+","+(Container as RepeaterItem).ItemIndex%>' />
                                </div>
                            </div>
                            <%--/回复对话框--%>
                            <%--删除对话框--%>
                            <div id="delModel<%#(Container as RepeaterItem).ItemIndex %>" class="modal hide fade"
                                tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                        ×</button>
                                    <h3 id="H10">
                                        删除消息警告</h3>
                                </div>
                                <div class="modal-body">
                                    <p>
                                        您确定要删除这条消息？</p>
                                </div>
                                <div class="modal-footer">
                                    <button class="btn" data-dismiss="modal" aria-hidden="true">
                                        关闭</button>
                                    <asp:Button ID="Button1" runat="server" CssClass="btn btn-primary" CommandName="btn_Delete"
                                        CommandArgument='<%# Eval("message_id") %>' Text="删除" data-dismiss="modal" aria-hidden="true">
                                    </asp:Button>
                                </div>
                            </div>
                            <%--/删除对话框--%>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
        </div>
    </div>
    </form>
    <hr />
    <footer>
                <p>&copy; Company 2013</p>
            </footer>
    </div>
    <!-- /container -->
    </form>
    <script src="../js/jquery-2.0.0.min.js" type="text/javascript"></script>
    <script src="../js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>
